export class FunctionModel {
    private static count: number;
    id: number;
    name: string;
    detail?: string;
    subs: FunctionModel[] = [];
    page: string;

    constructor(name: string, page:string,detail?: string,) {
        this.name = name;
        this.detail = detail;
        this.id = FunctionModel.count++;
        this.page = page;
        this.subs = [];
    }
    addSubFunction(f: FunctionModel) {
        this.subs.push(f);
    }
    addSub(name: string, page:string,detail?: string) {
        let f = new FunctionModel(name,page, detail);
        this.subs.push(f);
    }
}